package com.njwb.day05;

public class TestPeople1 {
    public static void main(String[] args) {
        /*
        自定义一个People类
        提供三个属性：姓名String，性别boolean true男 false女，配偶
        提供一个marry结婚的方法
        需求：创建几个实例对象，调用marry方法
             同性不能结婚
             结过婚的不能再结婚
         */

People1 people1=new People1("张三",true);
People1 people12 =new People1("李四",false);
        People1 people13 =new People1("王五",false);
        People1 people14 =new People1("麻子",false);


people1.marry(people12);
        System.out.println("===================================");
        people1.marry(people13);
        System.out.println("===================================");
        people14.marry(people13);


    }
}
